# This is a smaller test program meant to be used just as a quick "it works"
# check on tiny platforms. This program's metrics (source code size after
# minification, bytecode and RAM usage) should be kept rather small so that it
# can compile and run on very tiny devices (just KBs of RAM).

fun: ++ 2 * .         # function test, does (x + 1) * 2
err: 0 "ERROR" --> .

0 "test: " -->
~a 3 $:a              # a := 3

1000 @@               # 1000 iteration loop
  $0 1 = ?
    !@
  .

  --
.

0                     # prepare place
~8 257 >0 ~0          # this should move 1 to env. 0

+                     # after this we have 2
fun                   # after this we have 6
$a /                  # after this we have 2

$0 7 = ?              # just test branches
  err
;
  $0 2 = ?
    0 "OK" -->
  ;
    err
  .
.
